
<table id=table class="adminlist">
	<thead>
		<tr>
			<th style='text-align:center;'>No</th>
			
			<th id='no_pendaftaran' class='{$data.sort_no_pendaftaran}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">No Pendaftaran</a></th>

			<th id='nama'  class='{$data.sort_nama}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Nama</a></th>
<!--		  
			<th id='tempat_lahir' class='{$data.sort_tempat_lahir}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">T.Lahir</a></th>
-->		  
			<th id='tgl_lahir' class='{$data.sort_tgl_lahir}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">TglLahir</a></th>
		  
			<th id='jenis_kelamin' class='{$data.sort_jenis_kelamin}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Jenis Kelamin</a></th>
			
			<th id='tinggi_badan' class='{$data.sort_tinggi_badan}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Tinggi</a></th>
<!--			
			<th id='agama' class='{$data.sort_agama}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Agama</a></th>
			
			<th id='propinsi_smtaID' class='{$data.sort_propinsi_smtaID}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Prop</a></th>
-->			
			<th id='tahun_lulus' class='{$data.sort_tahun_lulus}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">ThnLulus</a></th>
			
			<th id='jenis' class='{$data.sort_jenis}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Jenis SMTA</a></th>
			
			<th id='jurusan_smta' class='{$data.sort_jurusan_smta}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Jurusan SMTA</a></th>
			
			<th id='jurusan' class='{$data.sort_jurusan}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Pilihan Jurusan</a></th>
			
			
			<th id='lokasiTKD' class='{$data.sort_lokasiTKD}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Lokasi TKD</a></th>
			
			<th id='lokasiTKA' class='{$data.sort_lokasiTKA}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Lokasi TKA</a></th>
			
<!--		
			<th id='lokasiID' class='{$data.sort_lokasiID}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">LokTest</a></th>
				
			<th id='mat_4' class='{$data.sort_mat_4}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Mat4</a></th>
			
			<th id='fisika_4' class='{$data.sort_fisika_4}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Fis4</a></th>
			
			<th id='inggris_4' class='{$data.sort_inggris_4}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Ing4</a></th>
			
			<th id='mat_5' class='{$data.sort_mat_5}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Mat5</a></th>
			
			<th id='fisika_5' class='{$data.sort_fisika_5}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Fis5</a></th>
			
			<th id='inggris_5' class='{$data.sort_inggris_5}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Ing5</a></th>
			
			<th id='mat_6' class='{$data.sort_mat_6}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Mat6</a></th>
			
			<th id='fisika_6' class='{$data.sort_fisika_6}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Fis6</a></th>
			
			<th id='inggris_6' class='{$data.sort_inggris_6}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Ing6</a></th>

			<th id='register_date' class='{$data.sort_register_date}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Date</a></th>
			
			<th id='email' class='{$data.sort_email}' style='cursor:pointer; text-align:center;'>
			<a href="javascript:void();">Email</a></th>
-->		
		</tr>
	</thead>
	
	<tbody>

	{if $data.rows}
		{foreach name=data  from=$data.rows item=i}	
			{$css   =  ($smarty.foreach.data.iteration % 2 == 0) ? "'row0'": "'row1'"}
			
			<tr class={$css}>
			
				
				<td class='tc'><span class="tag tag-gray">{$smarty.foreach.data.iteration + $data.offset}</span></td>
				<!--
				<td class='edit'>
				
					<a href='{$site.site}admin/contentForm/{$i.no_pendaftaran}/{$data.order}/{$data.sort}/{$data.paging.c}/{$data.limit}'>
					{$i.nama}
					</a>
				</td>
				-->
				<td class='tc'><a href='{$site.site}admin/pendaftaranDetail/{$i.no_pendaftaran}/{$data.order}/{$data.sort}/{$data.paging.c}/{$data.limit}'>{$i.no_pendaftaran}</a></td>
				
				<td class='tc'><a href='{$site.site}admin/pendaftaranDetail/{$i.no_pendaftaran}/{$data.order}/{$data.sort}/{$data.paging.c}/{$data.limit}'>{$i.nama}</a></td>
				
<!--		<td class='tc'>{$i.tempat_lahir}</td>	-->
				<td class='tc'>{$i.tgl_lahir}</td>
				
				{if  $i.jenis_kelamin > 0}
						<td  class='center'>
							Perempuan
								{else}
						<td  class='center'>
							Laki-laki
				{/if}
				
				<td class='tc'>{$i.tinggi_badan}</td>
<!--		<td class='tc'>{$i.propinsiID}</td>	-->
				<td class='tc'>{$i.tahun_lulus}</td>
				<td class='tc'>{$i.jenis}</td>
				<td class='tc'>{$i.jurusan}</td>
				<td class='tc'>{$i.jurusan_smta}</td>
				
				<td class='tc'>{$i.lokasiTKD}</td>
				<td class='tc'>{$i.lokasiTKA}</td>
				
<!--		<td class='tc'>{$i.lokasiID}</td>
				<td class='tc'>{$i.mat_4}</td>
				<td class='tc'>{$i.fisika_4}</td>
				<td class='tc'>{$i.inggris_4}</td>
				<td class='tc'>{$i.mat_5}</td>
				<td class='tc'>{$i.fisika_5}</td>
				<td class='tc'>{$i.inggris_5}</td>
				<td class='tc'>{$i.mat_6}</td>
				<td class='tc'>{$i.fisika_6}</td>
				<td class='tc'>{$i.inggris_6}</td>
				<td class='tc'>{$i.register_date}</td>
				<td class='tc'>{$i.email}</td>				 -->
			</tr>
		{/foreach}
	{/if}
	</tbody>
	
	<tfoot>
	<tr>
		<td colspan="30">
		<del class="container">
			<div class="pagination"><div class="paging">
			
				{if count($data.paging) > 0}
				<a class='first' href='{$site.site}admin/pendaftaran/{$data.order}/{$data.sort}/1/{$data.limit}'></a>
				<a class='prev'  href='{$site.site}admin/pendaftaran/{$data.order}/{$data.sort}/{$data.paging.p}/{$data.limit}'></a>     
				<span>Page {$data.paging.c} of {$data.paging.l} </span>
				<a class='next'  href='{$site.site}admin/pendaftaran/{$data.order}/{$data.sort}/{$data.paging.n}/{$data.limit}'></a>
				<a class='last'  href='{$site.site}admin/pendaftaran/{$data.order}/{$data.sort}/{$data.paging.l}/{$data.limit}'></a>
				{/if}
			</div></div>
		</del>
		</td>
	</tr>
	</tfoot>

</table>


<script id="category-script" type="text/javascript">
$(document).ready(function(){
	$("#table thead th").each(
	   function(){
		  $( this ).bind (
			 "click",
			 function(){
				var id   =  $(this).attr('id') ;
				var sort =  $(this).attr('class');
				
				$('#table').load('{$site.site}adminajax/pendaftaranSorting/' + id + '/' + sort + '/' + {$data.page} + '/' + {$data.limit});
			 }
		  );
	   }
	);   

	$('.publish a').click( function (e) {
		var id = $(this).attr('id');
		var publish = $(this).attr('class');

		var _post = [{ name:'id', value:id }]
		_post.push({ name:'publish', value:publish });
		
		$.post('{$site.site}adminajax/contentPublishing/', _post, function(response) {
			//alert(id + '=' + response + '=' + publish);
			
			if (response=="0"){
				$(this).attr('class', '1');
				$('#img_' + id).attr('src', '{$site.assets}css/img/led-ico/unpublish.png');
			} else if (response=="1"){
				$(this).attr('class','0');
				$('#img_' + id).attr('src', '{$site.assets}css/img/led-ico/publish.png');
			} else {
				alert(response);
			}
		});
	});
});
</script>